package com.rpframework.module.common.bottom.service;

import com.rpframework.core.json.ServletThreadLocal;
import com.rpframework.module.common.mybatis.mapper.Mapper;
import tk.mybatis.mapper.entity.Example;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 基础服务层
 * Created by jump on 2016/7/11.
 */
public interface BaseService<T> extends Mapper<T> {
    HttpServletRequest request = ServletThreadLocal.getRequest();
    HttpServletResponse response = ServletThreadLocal.getResponse();

    default Example uptTimeOrderSql() {
        Example example = getExample();
        example.orderBy("uptDatetime");
        return example;
    }
}
